/*
 * @Author: Jimmy
 * @LastModifiedBy: Jimmy
 * @Date: 2024-04-03 21:09:22
 * @LastEditTime: 2025-05-19 19:54:47
 * @FilePath: /monitor_belt/src/routers/index.tsx
 */
import LazyLoader from "@/components/lazy_loader/index";
import { lazy } from "react";
import { IRoute } from "./router.types";
import Layout from "@/layout";
import { Login } from "@/views/login/index";

export const routers: IRoute[] = [
  {
    path: "",
    label: "管理后台",
    element: <Layout />,
    meta: {
      isAuth: false,
      title: "管理后台",
    },
    children: [
      {
        path: "/",
        label: "首页",
        element: LazyLoader(lazy(() => import("@/views/home"))),
        meta: {
          title: "首页",
          icon: "home",
        },
      },
      {
        path: "/history",
        label: "预警历史",
        element: LazyLoader(lazy(() => import("@/views/history"))),
        meta: {
          title: "消息预警",
          icon: "history",
        },
      },
      {
        path: "/image",
        label: "异常视频",
        element: LazyLoader(lazy(() => import("@/views/image"))),
        meta: {
          title: "异常视频",
          icon: "video",
        },
      },
      {
        path: "/setting",
        label: "系统配置",
        element: LazyLoader(lazy(() => import("@/views/setting/index"))),
        meta: {
          title: "系统配置",
          icon: "setting",
        },
      },
      // {
      //   path: "/about",
      //   label: "关于",
      //   element: LazyLoader(lazy(() => import("@/views/about_us"))),
      //   meta: {
      //     title: "关于",
      //     icon: "about",
      //   },
      // },
    ],
  },
  {
    path: "/login",
    label: "登录",
    element: <Login />,
    meta: {
      isAuth: false,
      title: "登录",
    },
  },
];
